package com.ruoyi.business.controller;

import com.ruoyi.business.domain.BusRent;
import com.ruoyi.business.service.BusRentService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 内容:
 * 作者: cy
 */
@RestController
@Api(tags = "出租单管理")
@RequestMapping("business/rent")
public class RentController  extends BaseController {
   @Autowired
   private BusRentService busRentService;

   @GetMapping("list")
   @ApiOperation("分页查询出租单")
   public TableDataInfo getRentPage(BusRent busRent){
      startPage();
      LoginUser loginUser = getLoginUser();
      List<BusRent> busRentList = busRentService.selectRentPage(busRent,loginUser);
      return getDataTable(busRentList);


   }

}
